<template>
	<view>
		<!-- <view  @click="goCartList()">
			<image mode="aspectFill" class="shopping-cart-img" :src="(imgUrl+'/wx/shopping-cart.png')"/>

			<view class="shopping-cart-num">{{cartNum}}</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgUrl:this.$config.BASE_imgUrl,
				cartNum: 0
			};
		},
		created() {
			this.refresh()
		},
		methods: {
			refresh(){
				this.cartNum = this.$util.getShoppingCart().length
			},
			goCartList() {
				uni.navigateTo({
					url: "/pagesC/shopping-cart/shopping-car-list"
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
